<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

	<title>File: rconfig.rb [RDoc Documentation]</title>

	<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet" />

	<script src="../js/jquery.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../js/thickbox-compressed.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../js/quicksearch.js" type="text/javascript"
		charset="utf-8"></script>
	<script src="../js/darkfish.js" type="text/javascript"
		charset="utf-8"></script>
</head>

<body class="file file-popup">
	<div id="metadata">
		<dl>
			<dt class="modified-date">Last Modified</dt>
			<dd class="modified-date">2012-05-02 23:08:52 -0700</dd>

			
			<dt class="requires">Requires</dt>
			<dd class="requires">
				<ul>
				
					<li>active_support</li>
				
					<li>active_support/hash_with_indifferent_access</li>
				
					<li>rconfig/core_ext/array</li>
				
					<li>rconfig/core_ext/hash</li>
				
					<li>rconfig/core_ext/nil</li>
				
				</ul>
			</dd>
			

			
		</dl>
	</div>

	<div id="documentation">
		
		<div class="description">
			<h2>Description</h2>
			<p>
Copyright &#169; 2009 Rahmal Conda <rahmal@gmail.com>
</p>
<hr style="height: 10px"></hr><p>
The complete solution for Ruby Configuration Management. <a
href="../RConfig.html">RConfig</a> is a Ruby library that manages
configuration within Ruby applications. It bridges the gap between yaml,
xml, and key/value based properties files, by providing a centralized
solution to handle application configuration from one location. It provides
the simplicity of hash-based access, that Rubyists have come to know and
love, supporting your configuration style of choice, while providing many
new features, and an elegant API.
</p>
<hr style="height: 10px"></hr><ul>
<li><p>
Simple, easy to install and use.
</p>
</li>
<li><p>
Supports yaml, xml, and properties files.
</p>
</li>
<li><p>
Yaml and xml files supprt infinite level of configuration grouping.
</p>
</li>
<li><p>
Intuitive dot-notation &#8216;key chaining&#8217; argument access.
</p>
</li>
<li><p>
Simple well-known hash/array based argument access.
</p>
</li>
<li><p>
Implements multilevel caching to reduce disk access.
</p>
</li>
<li><p>
Short-hand access to &#8216;global&#8217; application configuration, and
shell environment.
</p>
</li>
<li><p>
Overlays multiple configuration files to support environment, host, and
even locale-specific configuration.
</p>
</li>
</ul>
<hr style="height: 10px"></hr><pre>
 The overlay order of the config files is defined by SUFFIXES:
 * nil
 * _local
 * _config
 * _local_config
 * _{environment} (.i.e _development)
 * _{environment}_local (.i.e _development_local)
 * _{hostname} (.i.e _whiskey)
 * _{hostname}_config_local (.i.e _whiskey_config_local)
</pre>
<hr style="height: 10px"></hr><p>
Example:
</p>
<pre>
 shell/console =&gt;
   export LANG=en

 demo.yml =&gt;
  server:
    address: host.domain.com
    port: 81
 ...

 application.properties =&gt;
   debug_level = verbose
 ...
</pre>
<p>
demo.rb =>
</p>
<pre>
 require 'rconfig'
 RConfig.load_paths = ['$HOME/config', '#{APP_ROOT}/config', '/demo/conf']
 RConfig.demo[:server][:port] =&gt; 81
 RConfig.demo.server.address  =&gt; 'host.domain.com'

 RConfig[:debug_level] =&gt; 'verbose'
 RConfig[:lang] =&gt; 'en'
 ...</pre>

		</div>
		
	</div>
</body>
</html>

